package com.sunway.paisong.pos.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

import com.sunway.paisong.pos.service.CheckService;
import com.sunway.paisong.pos.util.PollingUtils;

public class BootCompletedReceiver extends BroadcastReceiver {

	public void onReceive(Context context, Intent intent) {
		if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {
			PollingUtils.stopPollingService(context, CheckService.class, CheckService.ACTION);
			PollingUtils.startPollingService(context, 5, CheckService.class, CheckService.ACTION);
		}
	}
}